﻿<%@ Page Title="" Language="C#" MasterPageFile="~/VSFuncionario.Master" AutoEventWireup="true" CodeBehind="TurmaCadastro.aspx.cs" Inherits="Presentation.TurmaCadastro" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        #Button1
        {
            width: 67px;
        }
                       
    .style1
    {
        text-align: left;
        color:#000000;
    }
                       
    </style>
    <script language="javascript" type="text/javascript">

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p class="style1">
        <td style="width:100%;">
            <tr>
                <td class="style1">
                    </p>
<p>
                    Curso:</td>&nbsp;&nbsp;&nbsp;
                <td>
                    <asp:DropDownList ID="ddlCurso" runat="server" 
                        DataSourceID="EntityDataSource1" DataTextField="Nome" 
            DataValueField="ID" AutoPostBack="True" 
            onselectedindexchanged="ddlCurso_SelectedIndexChanged" AppendDataBoundItems="True">
                        <asp:ListItem Value="0">Selecione</asp:ListItem>
                    </asp:DropDownList>
                    <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
                        ConnectionString="name=DBUCNEntities" DefaultContainerName="DBUCNEntities" 
                        EnableFlattening="False" EntitySetName="TBCursoes" EntityTypeFilter="TBCurso">
                    </asp:EntityDataSource>
                <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
                </td>
                <td>
                    &nbsp;</p>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            Grade:&nbsp;&nbsp; &nbsp;<asp:DropDownList ID="ddlGrade" runat="server" DataTextField="Ano" 
                DataValueField="ID">
            </asp:DropDownList>
            <br />
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:DBUCNConnectionString %>" 
                SelectCommand="SELECT * FROM [TBGrade] WHERE ([IDCurso] = @IDCurso)">
                <SelectParameters>
                    <asp:ControlParameter ControlID="ddlCurso" DefaultValue="0" Name="IDCurso" 
                        PropertyName="SelectedValue" Type="Int32" />
                </SelectParameters>
            </asp:SqlDataSource>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="ddlCurso" 
                EventName="SelectedIndexChanged" />
        </Triggers>
    </asp:UpdatePanel>
    <p>
                    Nome:&nbsp;&nbsp;&nbsp; </td>
                &nbsp;<asp:TextBox ID="TxtNome" runat="server" Width="44px"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style1">
    </p>
    <p>
                    Semestre:</td>&nbsp;<td style="margin-left: 80px"><asp:DropDownList 
                        ID="TxtSemestre" runat="server">
                        <asp:ListItem Selected="True" Value="1">Selecione</asp:ListItem>
                        <asp:ListItem Value="1"></asp:ListItem>
                        <asp:ListItem Value="2">2</asp:ListItem>
                        <asp:ListItem Value="3"></asp:ListItem>
                        <asp:ListItem Value="4"></asp:ListItem>
                        <asp:ListItem Value="5"></asp:ListItem>
                        <asp:ListItem Value="6"></asp:ListItem>
                        <asp:ListItem Value="7"></asp:ListItem>
                        <asp:ListItem Value="8"></asp:ListItem>
                        <asp:ListItem Value="9"></asp:ListItem>
                        <asp:ListItem Value="10"></asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    &nbsp;</td>
            </p>
    <p>
            </tr>
            <tr>
                <td class="style1">
                    Ano:</td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<asp:TextBox ID="TxtAno" runat="server" Width="44px"></asp:TextBox>
                </td>
                <td>
                    &nbsp;</td></p>
    <p>
            &nbsp;<td class="style1">
                <asp:Button ID="BtnCadastrar" runat="server" onclick="BtnCadastrar_Click" 
                        Text="Cadastrar" ValidationGroup="cadastar" 
                BackColor="#87CEFF" />

                </td>
                <td style="margin-left: 80px">
                </td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
                    <asp:Button ID="BntLimpar" runat="server" Text="Limpar" 
            Width="70px" BackColor="#87CEFF" />
    </p>
</asp:Content>
